package com.chain.BrotherExchange.ui.activity;

import android.content.Context;
import android.content.Intent;
import android.support.v4.view.ViewPager;

import com.chain.BrotherExchange.R;
import com.chain.BrotherExchange.ui.adapter.SimpleFragmentPagerAdapter;
import com.chain.BrotherExchange.ui.core.BaseActivity;
import com.chain.BrotherExchange.ui.fragment.ChargeMoneyDetailsListFragment;
import com.chain.BrotherExchange.ui.fragment.CoinDetailsListFragment;
import com.chain.BrotherExchange.ui.fragment.ExtractMoneyDetailsListFragment;
import com.chain.BrotherExchange.ui.fragment.LegalTenderDetailsListFragment;
import com.chain.BrotherExchange.ui.fragment.OtherDetailsListFragment;
import com.chain.BrotherExchange.ui.fragment.TransferDetailsListFragment;
import com.chain.BrotherExchange.utils.ActivityBarHelper;

import java.util.ArrayList;
import java.util.Arrays;

import butterknife.Bind;

/**
 * 资产明细
 */
public class AssetsDetailsActivity extends BaseActivity {

    @Bind(R.id.assets_view_pager) ViewPager mAssetsViewPager;

    public static void launch(Context context) {
        context.startActivity(new Intent(context, AssetsDetailsActivity.class));
    }


    @Override
    protected int getLayoutID() {
        return R.layout.activity_assets_details;
    }

    @Override
    protected void initActions() {
        ActivityBarHelper.init(this, R.string.title_assets_details);

        mAssetsViewPager.setAdapter(new SimpleFragmentPagerAdapter(
                getSupportFragmentManager(),
                new ArrayList<>(Arrays.asList(
                        new LegalTenderDetailsListFragment(),
                        new CoinDetailsListFragment(),
                        new ChargeMoneyDetailsListFragment(),
                        new ExtractMoneyDetailsListFragment(),
                        new TransferDetailsListFragment(),
                        new OtherDetailsListFragment()
                )),
                new ArrayList<>(Arrays.asList(
                        getString(R.string.legal_tender),
                        getString(R.string.coin_coin),
                        getString(R.string.charge_money),
                        getString(R.string.extract_money),
                        getString(R.string.transfer),
                        getString(R.string.other)
                ))
        ));
    }
}
